home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Installation Tools & Overlays 2001 May
/
SGI IRIX Installation Tools & Overlays 2001 May - Disc 3.iso
/
relnotes
/
dmedia_dev
/
ch06.z
/
ch06
Wrap
Text File
|
2001-04-16
|
5KB
|
133 lines
- 1 -
6. _M_I_D_I__L_i_b_r_a_r_y
This chapter lists information about the MIDI programming
interface included in the IRIS Digital Media Development
Environment. It includes changes, additions, and bug fixes
since the last release, and known problems and workarounds.
The MIDI Library (_l_i_b_m_d._s_o) is a collection of routines for
performing I/O using the Musical Instrument Digital
Interface. _l_i_b_m_d provides a MIDI message-based interface.
MIDI input is time stamped as differences as well as
relative to a given time. MIDI output is also time stamped,
and the driver can buffer output to be sent over the MIDI
wire at the correct time.
To use MIDI, you must first install the MIDI STREAMS module
that sits between the application and the serial port. Use
the command _s_t_a_r_t_m_i_d_i to do this. _s_t_a_r_t_m_i_d_i takes as its
arguments a name you wish to associate with a device and the
tty devices you wish to use for MIDI. For example:
ssssttttaaaarrrrttttmmmmiiiiddddiiii ----nnnn sssseeeerrrriiiiaaaallll2222 ----dddd ////ddddeeeevvvv////ttttttttyyyydddd2222
sets up /dev/ttyd2 as a MIDI port, called "serial2". It does
not affect /dev/ttyd1.
For additional information about the MIDI Library see the
overview man page _m_d_I_n_t_r_o(3dm)
6.1 _C_h_a_n_g_e_s
+o The MIDI library has been completely re-implemented for
release 2.0. All of the old calls are now obsolete.
6.2 _A_d_d_i_t_i_o_n_s
+o Additional features include, but are not limited to,
time stamping in musical times (eg ticks per beat),
built in panic function, 64 bit time stamps and audio
synchronization features.
+o The IRIX 6.2 and later versions of the MIDI Library
implement "internal" MIDI ports which can be used to
transmit MIDI events between IRIX processes.
+o The MIDI programming example programs found in
/_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_m_i_d_i have been revised and
updated. The MIDI examples include some simple programs
to demonstrate MIDI input and output, and a simple
example Standard MIDI File library (included in the
- 2 -
directory /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_l_i_b_m_i_d_i_f_i_l_e). There
are programs that demonstrate synchronized recording
and play back of audio and MIDI files. The source code
for the standard IRIX 6.2 and later ssssoooouuuunnnnddddppppllllaaaayyyyeeeerrrr((((1111)))) tool
is included in the /_u_s_r/_s_h_a_r_e/_s_r_c/_d_m_e_d_i_a/_s_o_u_n_d_p_l_a_y_e_r
directory. This tool is capable of playing back
Standard MIDI Files and a variety of different digital
audio file formats.
6.3 _B_u_g__F_i_x_e_s
+o Output and input are now more reliable. There can no
longer be any confusion as to which device a message
originates from.
6.4 _K_n_o_w_n__P_r_o_b_l_e_m_s__a_n_d__W_o_r_k_a_r_o_u_n_d_s
This section lists some of the known problems with the IDO
6.4 release of the MIDI library.
+o MIDI Sample Dump has not been rigorously tested on the
SGI MIDI library, and SGI does not guarantee that it
will work.
+o Currently, the MIDI system does not automatically
synchronize to an external sequencer or drum machine,
nor does it generate MIDI clocks to synchronize other
devices.
Work around this by adding MIDI clocks to your output
stream when playing back sequences (if desired). For
slaving, examine the time stamps on incoming MIDI
clocks to calculate tempo.
+o The MIDI library is not multi-thread safe. Although
some library calls are safe to do from multiple
threads, as a rule of thumb one should limit all mdSend
and mdReceive calls to a single thread in a multi-
threaded application. mdPause, mdPanic and mdTell may
be called from any thread, provided that access to the
MDport is appropriately semaphored.
+o mdGetTempo retrieves the last tempo set on a port,
rather than asking the driver what the tempo is.